1. Field of the Invention
This invention relates to graphic processing. In particular, the invention relates to graphic processing using polygon meshes.
2. Description of Related Art
In three-dimensional (3-D) graphics, objects are represented using a number of techniques such as polygon mesh, modeling, etc. Among these techniques, polygon mesh representation is popular.
In polygon mesh representation, an object is represented by a mesh of polygonal facets. In the general case, an object has curved surfaces and the facets are an approximation to such a surface. A polygon mesh representation is a geometric and topological description of the boundary or surface of the object. A polygon mesh is a structure that consists of polygons represented by a list of (x, y, z) coordinates that are the polygon vertices. Thus the information stored to describe the object is a list of coordinates of points or vertices.
When a 3-D object is processed by a processor in a computer system, the processing time depends on a number of factors. One of the important factors is the memory referencing time to retrieve the information describing the objects such as the list of vertex coordinates. In 3-D graphics processing, the list of vertex coordinates are usually indexed or referenced by the corresponding polygon indices. The processing of the polygons involving the indexing of the vertex coordinates and transformation calculations is referred to as the geometry computations.
On-line driver is a method that allows the commands to a graphics controller (GC) to be sent to the GC concurrently with the geometry computations to speed up the overall processing time. However, when the size of the indexed primitives is large, such as in complex 3-D scenes, the on-line driver becomes inefficient. The reason for this inefficiency is that if the GC does not support indexed primitives, as is often the case, the entire pool of indexed primitives has to be stored in an intermediate buffer and the vertex information is sent to the GC on a polygon-by-polygon basis. This will eliminate the gain of concurrent processing and cause dirty writebacks from the intermediate buffer which incurs additional overhead.
Therefore there is a need in the technology to provide an efficient method and apparatus to process the polygon meshes for 3-D graphics.
The present invention is directed to a method and apparatus for processing normalized meshes. The normalized meshes are formed by N polygons which have M vertices. The M vertex coordinates are stored in a vertex array corresponding to the M vertices of the N polygons. N polygon indices are stored in an index array. Each of the N polygon indices references a predetermined number of the M vertex coordinates. A first subset of the index array having N1 polygon indices is determined. A second subset of the vertex array is selected such that the second subset contains M1 vertex coordinates corresponding entirely to the N1 polygon indices in the first subset. The second subset defines a window having a small size relative to the vertex array. The M1 vertex coordinates in the second subset are processed to generate processed data. The processed data are then concurrently sent to a graphics processor in an on-line manner.